Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1110 #1111

Merged
merged 5 commits into from
Jul 16, 2024
Merged

fix #1110 #1111

merged 5 commits into from
Jul 16, 2024

Conversation

SunlightBro
Copy link
Contributor

  • add custom_lint.log to .gitignore
  • fix MissingPrivateEmptyCtor
  • add test-case inside example
  • prepare version 0.0.6 & CHANGELOG

- add custom_lint.log to .gitignore
- fix MissingPrivateEmptyCtor
- add test-case inside example
- prepare version 0.0.6 & CHANGELOG
Copy link

changeset-bot bot commented Jul 16, 2024

⚠️ No Changeset found

Latest commit: d5fffe7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@SunlightBro
Copy link
Contributor Author

SunlightBro commented Jul 16, 2024

using stable or beta flutter analyze . has no issues.

but on master the main issue (I think) is in custom_lint_core/lib/src/lint_codes.dart,
because analyzer/src/dart/error/lint_codes.dart now also defines LintCode.

Analyzing freezed_lint...                                               

  error • The argument type 'dynamic' can't be assigned to the parameter type 'ErrorCode'.  • lib/src/missing_mixin.dart:30:37 • argument_type_not_assignable
  error • The argument type 'dynamic' can't be assigned to the parameter type 'ErrorCode'.  • lib/src/missing_mixin.dart:36:35 • argument_type_not_assignable
  error • The argument type 'dynamic' can't be assigned to the parameter type 'ErrorCode'.  • lib/src/missing_private_empty_ctor.dart:44:35 • argument_type_not_assignable

@rrousselGit
Copy link
Owner

Do you mind adding the necessary import alias or show/hide?

@SunlightBro
Copy link
Contributor Author

SunlightBro commented Jul 16, 2024

Requires one change in custom_lint_core/lib/src/lint_rule.dart

  import 'package:analyzer/dart/ast/ast.dart';
- import 'package:analyzer/error/error.dart';
+ import 'package:analyzer/error/error.dart' show AnalysisError;
  import 'package:analyzer/error/listener.dart';

final accessors = element.accessors;
final methods = element.methods.where((method) => !method.isStatic);
final fields = element.fields.where((field) => !field.isStatic);
final accessors =
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch to add accessors! Thank you for the quick fix @SunlightBro

@rrousselGit rrousselGit merged commit 93b40d1 into rrousselGit:master Jul 16, 2024
2 of 7 checks passed
@rrousselGit
Copy link
Owner

TY!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants